class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print('Eating')

    def sleep(self):
        print('Sleep')

    def drink(self):
        print('Drink')

    def run(self):
        print('Run')


class Dog(Animal):
    def bark(self):
        print('Bark')


class Cat(Animal):
    def catch(self):
        print('Catch')


class Xiaotianquan(Dog):
    def fly(self):
        print('Fly')

    #父类方法不满足子类需求时，可进行重写(override)
    def bark(self):
        super().bark() # 匿名父类对象， 调  用父类代码,也可不调用
        print("huluhulu")



if __name__ == '__main__':
    wangcai = Dog('wangcai')
    wangcai.eat()
    wangcai.sleep()

    print('*' * 50)
    nb = Xiaotianquan("nb")
    nb.bark()